package com.lzw.http;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author liuzw
 * @date 2023/10/19
 */
@FeignClient(value = "HTTP", url = "https://openapi.lddgo.net/base/gtool/api/v1/Pinyin", contextId = "com.lzw.http.IGetPinyin")
public interface IGetPinyin extends IBaseHttp {
    /**
     * 发送GET请求
     *
     * @return JSON
     */
//    @PostMapping(produces = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
//    String execution(@RequestParam String hanzi,
//                     @RequestParam(defaultValue = "1") int with_tone,
//                     @RequestParam(defaultValue = "0") int with_seperator,
//                     @RequestParam(defaultValue = "0") int first_letter_uppercase);
    @PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)
    String execution(String request);
}
